#ifndef __MODBUS_TCP_USER_H
#define __MODBUS_TCP_USER_H
#include "mb.h"

#define REG_INPUT_START         1
#define REG_INPUT_NREGS         128
#define REG_HOLDING_START       1
#define REG_HOLDING_NREGS       128
#define REG_COILS_START       1
#define REG_COILS_NREGS       128
#define REG_DISCRETE_START       1
#define REG_DISCRETE_NREGS       128

/* ----------------------- Static variables ---------------------------------*/
// extern USHORT   usRegInputStart = REG_INPUT_START;
extern USHORT   usRegInputBuf[REG_INPUT_NREGS];
// extern USHORT   usRegHoldingStart = REG_HOLDING_START;
extern USHORT   usRegHoldingBuf[REG_HOLDING_NREGS];
// extern USHORT   usRegCoilsStart = REG_COILS_START;
extern BOOL     usRegCoilsBuf[REG_COILS_NREGS];
// extern USHORT   usRegDiscreteStart = REG_DISCRETE_START;
extern BOOL     usRegDiscreteBuf[REG_DISCRETE_NREGS];

extern int modbus_tcp_init(void);
// extern BOOL *modbus_get_coils_buf(void);
// extern BOOL *modbus_get_discrete_buf(void);
// extern USHORT *modbus_get_holding_buf(void);
// extern USHORT *modbus_get_input_buf(void);
#endif
